import random

evennumber, odnumber = 0, 0
for i in range(0, 1000):
    dice = random.randint(1, 6)
    if dice % 2 == 0:
        evennumber += 1
    else:
        odnumber += 1
print("掷出偶数的概率是:", evennumber / 1000)
print("掷出奇数的概率是:", odnumber / 1000)




